home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
hity wydania
/
Bank smakow
/
BankSmakow.air
/
BankSmakow.swf
/
scripts
/
mx
/
effects
/
effectClasses
/
WipeDownInstance.as
< prev
next >
Wrap
Text File
|
2009-12-16
|
2KB
|
46 lines
package mx.effects.effectClasses
{
import mx.controls.SWFLoader;
import mx.core.mx_internal;
use namespace mx_internal;
public class WipeDownInstance extends MaskEffectInstance
{
mx_internal static const VERSION:String = "3.5.0.12683";
public function WipeDownInstance(param1:Object)
{
super(param1);
}
override protected function initMaskEffect() : void
{
var _loc2_:Number = NaN;
super.initMaskEffect();
var _loc1_:Number = target is SWFLoader && target.content ? Number(SWFLoader(target).contentHeight) : Number(targetVisualBounds.height / Math.abs(target.scaleY));
if(target.rotation != 0)
{
_loc2_ = target.rotation * Math.PI / 180;
_loc1_ = Math.abs(targetVisualBounds.width * Math.sin(_loc2_) + targetVisualBounds.height * Math.cos(_loc2_));
}
if(showTarget)
{
xFrom = targetVisualBounds.x;
yFrom = -effectMask.height + targetVisualBounds.y;
xTo = targetVisualBounds.x;
yTo = effectMask.height <= _loc1_ ? Number(_loc1_ - effectMask.height + targetVisualBounds.y) : Number(targetVisualBounds.y);
}
else
{
xFrom = targetVisualBounds.x;
yFrom = effectMask.height <= _loc1_ ? Number(targetVisualBounds.y) : Number(_loc1_ - effectMask.height + targetVisualBounds.y);
xTo = targetVisualBounds.x;
yTo = _loc1_ + targetVisualBounds.y;
}
}
}
}